﻿using System;
using sql_data_generator.FieldOptions;

namespace sql_data_generator.Randomizers
{
    class RandomizerGUID : BaseRandomizer<FieldOptionsGUID>, IRandomizer
    {
        public RandomizerGUID(FieldOptionsGUID options)
            : base(options)
        {
        }

        public object GetData()
        {
            if (IsNull())
            {
                return null;
            }

            var guid = Guid.NewGuid().ToString();

            return Options.Uppercase ? guid.ToUpperInvariant() : guid;
        }
    }
}